package spring.cloud.consumer.movie.feign.user.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import spring.cloud.consumer.movie.feign.user.entity.User;

/**
 * 使用@FeignClient("spring-cloud-provider-user")注解绑定spring-cloud-provider-user服务，还可以使用url参数指定一个URL。
 * Created by Enven on 2016/9/8.
 */
@FeignClient(name="spring-cloud-provider-user")
public interface UserFeignClient {

    @RequestMapping("/{id}")
    User findByIdFeign(@RequestParam("id") Long id);
}
